package com.tang.model.abstractfactory;

import java.util.Objects;

/**
 * @Author tangyuan2meicloud.com
 * @DATE 2021/8/27 22:50
 * @Desc
 * @Remarks
 */
public class JavaCourse extends AbstractCourseFactory {

    private static volatile JavaCourse javaCourse;

    private JavaCourse() {
    }

    public static JavaCourse getInstance() {
        if (Objects.isNull(javaCourse)) {
            synchronized (JavaCourse.class) {
                if (Objects.isNull(javaCourse)) {
                    javaCourse = new JavaCourse();
                }
            }
        }
        return javaCourse;
    }

    @Override
    protected INote createdNote() {
        return new JavaNote();
    }

    @Override
    protected IVedio createdVedio() {
        return new JavaVedio();
    }


}
